﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.master" CodeBehind="listarEventos.aspx.cs" Inherits="BackofficeExtremeEvents.Eventos.listarEventos" %>


<asp:Content ID="ListaEventos" runat="server" ContentPlaceHolderID="MainContent"> 
    <div>


        <asp:GridView ID="gvEventos" runat="server" AutoGenerateColumns="False" 
            AllowPaging="True" AllowSorting="True" DataKeyNames="id_evento" 
            DataSourceID="EntityDataSource1" EnableSortingAndPagingCallbacks="True" 
            onrowcommand="gvEventos_RowCommand">
            <Columns>
                <asp:BoundField DataField="id_evento" HeaderText="id_evento" ReadOnly="True" 
                    SortExpression="id_evento" Visible="False" />
                <asp:BoundField DataField="Evento" HeaderText="Evento" ReadOnly="True" 
                    SortExpression="Evento" />
                <asp:BoundField DataField="Data" HeaderText="Data" ReadOnly="True" 
                    SortExpression="Data" />
                <asp:BoundField DataField="Utilizador" HeaderText="Utilizador" ReadOnly="True" 
                    SortExpression="Utilizador" />
                <asp:ButtonField CommandName="Editar" HeaderText="Editar" Text="Editar" />
            </Columns>
      
        </asp:GridView>


        <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=extremeEventsEntities" 
            DefaultContainerName="extremeEventsEntities" EnableFlattening="False" 
            EntitySetName="listaEventos"
             
            Select="it.[id_evento], it.[Evento], it.[Data], it.[Utilizador]" 
            OrderBy="it.[id_evento]">
        </asp:EntityDataSource>


    </div>
    </asp:Content>

